home *** CD-ROM | disk | FTP | other *** search
- myPort <- MsgPort new: 'AmigaTalkTestPort'
-
- ( 'Executing the TestMsgPort file...' ) print
- ( 'This test file uses the AmigaTalk:C/MsgPortTester program ' ) print
-
- talkToPort <- 'ForeignMsgPort'
- talkToMsgSize <- 80
-
- "Start our auxillary MsgPort Testing program: "
-
- amigatalk sh: 'Run AmigaTalk:C/MsgPortTester ', talkToPort
-
- myPort addPort: talkToMsgSize priority: 0
-
- amigatalk setIOTitle: 'Testing Class MsgPort:'
- amigatalk setIOMessage: 'Ready to do some tests?'
- amigatalk displayString: '(Press DONE when ready)'
-
- portPresent <- myPort checkForPort
-
- ( 'portPresent sez: ', (portPresent asString)) print
-
- talkTo <- myPort getNamedSystemPort: talkToPort
-
- myMsg <- 'En guarde MsgPort Tester!'
-
- ('I told the MsgPortTester: ', myMsg ) print
-
- myPort sendMessageOutsideTo: talkTo msg: (myMsg asByteArray)
-
- replyWas <- myPort getMessage
-
- ('MsgPortTester replied: ') print
-
- replyWas printAsChars " V2.3 ByteArray method "
-
- amigatalk setIOMessage: 'Now, I am going to tell the Tester to go away!'
- amigatalk displayString: '(Press DONE when ready)'
-
- myPort sendMessageOutsideTo: talkTo msg: ('QUIT' asByteArray)
-
- amigatalk setIOMessage: 'The Tester window should now be gone!'
- amigatalk displayString: '(Press DONE when ready)'
-
- myPort killPort
-
- ( 'Finished with TestMsgPort!!' ) print
-